<script setup>
import { reactive } from 'vue';
import StringOrNumber from '../../../StringOrNumber.vue';
const props = defineProps({
  probeConfig: {
    type: Object
  },
  containerIndex: {
    type: Number
  },
  probeType: {
    type: String
  },
  containerType: {
    type: String
  }
})
const rules = reactive({
  port: [
    { required: true, message: '端口号或服务名必填', trigger: 'blur'}
  ],
})
</script>

<template>
  <el-row :gutter="20">
    <el-col :span="8">
      <el-form-item label="探测端口"
      :prop="('spec.template.spec.containers.'+props.containerIndex+'.'+props.probeType+'.tcpSocket.port')"
      :rules="rules.port"
      required>
        <StringOrNumber placeholder="端口号或svc名称" v-model:data="props.probeConfig.tcpSocket.port" style="width:150px"></StringOrNumber>
      </el-form-item>
    </el-col>
    <el-col :span="8">
      <el-form-item label="探测主机" prop="">
        <el-input placeholder="可选 默认Pod IP" v-model="props.probeConfig.tcpSocket.host" style="width:150px"></el-input>
      </el-form-item>
    </el-col>
  </el-row>
</template>

<style scoped>
</style>
